package com.nowoe.data.sqlSession;

import java.util.List;

/**
 * @author 倚栏听风 2023/9/14 16:43
 */
public interface SqlSession {
    <E> List<E> selectList(String statementId, Object param) throws Exception;

    <T> T selectOne(String statementId, Object param) throws Exception;

    int update(String statementId, Object param) throws Exception;

    int delete(String statementId, Object param) throws Exception;

    int insert(String statementId, Object param) throws Exception;

    /**
     * 关闭资源
     */
    void close();

    /**
     * 代理对象
     *
     * @param mapperClass
     * @param <T>
     * @return
     */
    <T> T getMapper(Class<?> mapperClass);
}
